Optimal. Leaf size=54 \[ \frac{(a+2 b) \cos (x)}{b^2}-\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \cos (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}-\frac{\cos ^3(x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0726949, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3190, 390, 205} \[ \frac{(a+2 b) \cos (x)}{b^2}-\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \cos (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}-\frac{\cos ^3(x)}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3190
Rule 390
Rule 205
Rubi steps
\begin{align*} \int \frac{\sin ^5(x)}{a+b \cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{a+b x^2} \, dx,x,\cos (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (-\frac{a+2 b}{b^2}+\frac{x^2}{b}+\frac{a^2+2 a b+b^2}{b^2 \left (a+b x^2\right )}\right ) \, dx,x,\cos (x)\right )\\ &=\frac{(a+2 b) \cos (x)}{b^2}-\frac{\cos ^3(x)}{3 b}-\frac{(a+b)^2 \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\cos (x)\right )}{b^2}\\ &=-\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \cos (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}+\frac{(a+2 b) \cos (x)}{b^2}-\frac{\cos ^3(x)}{3 b}\\ \end{align*}
Mathematica [B] time = 0.16841, size = 116, normalized size = 2.15 \[ \frac{3 \sqrt{b} (4 a+7 b) \cos (x)-\frac{12 (a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b}-\sqrt{a+b} \tan \left (\frac{x}{2}\right )}{\sqrt{a}}\right )}{\sqrt{a}}-\frac{12 (a+b)^2 \tan ^{-1}\left (\frac{\sqrt{a+b} \tan \left (\frac{x}{2}\right )+\sqrt{b}}{\sqrt{a}}\right )}{\sqrt{a}}-b^{3/2} \cos (3 x)}{12 b^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 86, normalized size = 1.6 \begin{align*} -{\frac{ \left ( \cos \left ( x \right ) \right ) ^{3}}{3\,b}}+{\frac{a\cos \left ( x \right ) }{{b}^{2}}}+2\,{\frac{\cos \left ( x \right ) }{b}}-{\frac{{a}^{2}}{{b}^{2}}\arctan \left ({b\cos \left ( x \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-2\,{\frac{a}{b\sqrt{ab}}\arctan \left ({\frac{b\cos \left ( x \right ) }{\sqrt{ab}}} \right ) }-{\arctan \left ({b\cos \left ( x \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77727, size = 383, normalized size = 7.09 \begin{align*} \left [-\frac{2 \, a b^{2} \cos \left (x\right )^{3} + 3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{-a b} \log \left (-\frac{b \cos \left (x\right )^{2} + 2 \, \sqrt{-a b} \cos \left (x\right ) - a}{b \cos \left (x\right )^{2} + a}\right ) - 6 \,{\left (a^{2} b + 2 \, a b^{2}\right )} \cos \left (x\right )}{6 \, a b^{3}}, -\frac{a b^{2} \cos \left (x\right )^{3} + 3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} \cos \left (x\right )}{a}\right ) - 3 \,{\left (a^{2} b + 2 \, a b^{2}\right )} \cos \left (x\right )}{3 \, a b^{3}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12684, size = 80, normalized size = 1.48 \begin{align*} -\frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \arctan \left (\frac{b \cos \left (x\right )}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} - \frac{b^{2} \cos \left (x\right )^{3} - 3 \, a b \cos \left (x\right ) - 6 \, b^{2} \cos \left (x\right )}{3 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]